

Page( {
    data: {
        username:null,
        phone: null,
        pwd: null,
        modelContent: '',
        code:null
    },
    onLoad: function() {
      
    },
    onRegTap: function( e ) {
      console.log("注册")
      console.log(e)
      wx.request({
        method:"POST",
        url: 'http://localhost:8989/user/reg',
        data:{
          username: e.detail.value.username,
          password:e.detail.value.password,
          phone:e.detail.value.phone,
          code:e.detail.value.code
        },
        success:(res)=>{
          console.log(res)
          wx.navigateTo({
            url: '/pages/user/login/page',
          })
        }
      })
    },
    onModalConfirm: function( e ) {
        const _this = this;
        _this.setData( { modelContent: '' });
    }
});